<main>
	<header>
		<div class="toolbar">
			<a class="bar-button back-button"><i class="dwz-icon-arrow-left"></i></a>
			<div class="header-title">录入发货过磅信息</div>
		</div>
	</header>

	<section>

		<form method="post" action="{{form_url}}" onsubmit="return biz.transport.formSubmitWeigh(this)">
			<input type="hidden" name="transport_id" value="{{vo.id}}">
			<div class="scroll-content dwz-scroll">
				<div class="scroll">

					{{if vo.status == 0}}
					<div class="form-content unitBox">
						<div class="form-item">
							<div class="item-content">
								<label>净重(kg)</label>
								<input type="number" name="weigh_first_commit" value="{{vo.weigh_first_commit|filterInputNum}}" class="required" placeholder="请输入净重" min="0.00" max="100000.00" step="0.01" data-error="请输入净重">
							</div>
						</div>
						<div class="form-item">
							<label>磅单照片</label>
							<div class="item-content">
								<ul id="upload-preview-weight-first" class="upload-preview dwz-ctl-del">
									{{each vo.weigh_first_pic as item}}
									<li class="thumbnail">
										<a class="img-del old-img-del" href="javascript:"><i class="dwz-icon-delete"></i></a><img class="pic" src="{{item}}" data-src="{{item}}">
									</li>
									{{/each}}
								</ul>
								<div class="upload-wrap" rel="#upload-preview-weight-first" data-name="__imgUrl[]">
									<button type="button">Upload</button>
								</div>
							</div>
						</div>
					</div>

					<div class="form-bar padding-h">
						<button class="button" type="submit">提交</button>
					</div>
					{{else}}
					<div class="form-content unitBox">
						<div class="form-item">
							<div class="item-content">
								<label>净重(kg)</label>
								<input type="number" name="weigh_first_commit" value="{{vo.weigh_first_commit}}" readonly>
							</div>
						</div>
						<div class="form-item">
							<label>磅单照片</label>
							<div class="item-content">
								<ul class="upload-preview">
									{{each vo.weigh_first_pic as item}}
									<li class="thumbnail"><img class="pic" src="{{item}}" data-src="{{item}}"></li>{{/each}}
								</ul>
							</div>
						</div>
					</div>
					{{/if}}

				</div>
			</div>
		</form>

	</section>
</main>